﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Payroll.BusinessLogic.Company;
using Payroll.Common.Utils;
using Payroll.BusinessLogic;

namespace PayrollHR.Administration.Modules
{
    public partial class CompanySearch : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int UserId = PayrollContext.Current.Session.EmployeeId;
                hfdUserId.Value = CommonHelper.ToString(UserId);
            }
        }
        public CompanySearchResult GetCompanySearch()
        {
            CompanySearchResult company = new CompanySearchResult
            {
                CompanyName = txtCompanyName.Text.Trim(),

                UserId = CommonHelper.ToInteger(hfdUserId.Value)
            };
            return company;
        }

    }
}